//package com.lh.controller;
//
//import com.lh.core.ActivitiProcessCore;
//import com.lh.entity.activiti.CompleteTask;
//import com.lh.entity.activiti.FindPersonalTask;
//import com.lh.entity.activiti.StartProcessBean;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.Map;
//
//@RestController
//@RequestMapping("/activiti")
//public class ActivitiController {
//
//    @Autowired
//    private ActivitiProcessCore activitiProcessCore;
//
//    @PostMapping("/deployment")
//    public void deployment(@RequestParam("name") String name, @RequestParam("path") String path) {
//        activitiProcessCore.deployment(name, path);
//    }
//
//    @PostMapping("/deleteDeployment")
//    public void deleteDeployment(@RequestParam("id") String id) {
//        activitiProcessCore.deleteDeployment(id);
//    }
//
//    @PostMapping("/startProcess")
//    public void startProcess(@RequestBody StartProcessBean startProcessBean) {
//        try{
//            String businessKey = startProcessBean.getBusinessKey();
//            Map<String, Object> variables = startProcessBean.getVariables();
//            activitiProcessCore.startProcess(businessKey,variables);
//        }catch (Exception e){
//            e.printStackTrace();
//        }
//    }
//
//    @PostMapping("/findPersonalTask")
//    public FindPersonalTask findPersonalTask(@RequestParam("taskName") String taskName,
//                                             @RequestParam("taskAssignee") String taskAssignee,
//                                             @RequestParam("isDueDate") boolean isDueDate) {
//        return activitiProcessCore.findPersonalTaskList(taskName,taskAssignee,isDueDate);
//    }
//
//    @PostMapping("/completeTask")
//    public void completeTask(@RequestBody CompleteTask completeTask) {
//        String businessKey = completeTask.getBusinessKey();
//        String currentAssignee = completeTask.getCurrentAssignee();
//        String comment = completeTask.getComment();
//        Map<String, Object> nextAssigneeMap = completeTask.getNextAssigneeMap();
//        activitiProcessCore.completTask(businessKey,currentAssignee,comment,nextAssigneeMap);
//    }
//}
